home *** CD-ROM | disk | FTP | other *** search
- Forthplay and Romplay Documentation and Comments
- Date: 09Jul89
-
- If you have this file, you should also have copies of
- ROMPLAY.BAS, ROMPLAY2.BAS, ROMPLAY3.BAS, and 4THPLAY.COM,
- CD-Audio players for the Hitachi CDR1503S or CDR3500 CD-ROM
- Drives and PC bus interface cards.
-
- Use Romplay & Romplay3 for keyboards with function keys across
- the top (enhanced layout). Romplay2 is better for the original
- keyboard. Romplay is intended for those times you want to do
- something other than compute. Forthplay is better for starting
- play or checking a drive.
-
- Required:
-
- Hitachi CDR1503S, CDR3500, or 100% compatible CD-ROM
- drive.
- Hitachi PC bus interface card: CDIFI2, CDIFI3A, CDIFI4, CDIFI4A,
- CDIF25A, CDIF25A2, or CDIF35A
-
- 300H base address for Forthplay, Romplay base is changeable (see
- line 10010).
-
- For Romplay, GWBASIC (Non-IBM, about 80K file size), or the
- BASICA version for IBM, (if you really have an IBM), or with
- Tandy & Compaq, the BASICA version with Tandy or Compaq MS-DOS.
-
- On a monochrome system, you will need to edit the program colors
- and may need to change some color indicators and graphics
- chracters. First try changing the colors defined around 10000.
- Blue/green paper must black, tip colors set to white/lwhite. It
- may be less trouble to use Forthplay and auto.
-
- Romplay Functions:
-
- E Eject Disc
- A Accept Disc - Close Tray when present and open
- S Sample first 17 seconds of each track
- P Play - Start to End, Next Que, or Section Repeat
- < > Reverse/Forward 1 Track - , .
- <<< >>> Reverse/Forward 1 minute - { }
- << >> Reverse/Forward 10 seconds - [ ]
- N Number Play - Enter Start & End track numbers
- ------ Spacebar toggles Pause On/Off - clears modes
- C Cue to start of current track or release cue/pause
- Q Quit - Immediately go to DOS with clear screen
- 1-9 First digit of number play entry sequence
- R Repeat Play from Starting to Ending Track
- T Toggle Que On/Off for use at next Play or end
- of current play
- B Begin - Mark currently played location for Section
- Play
- F Finish - Section Play end - enable mode for play
- (Must be greater than Begin location) (Press Play
- to start Section Play - Space Bar to exit)
- M Manage Que - set mode for Que functions
- / Shuffle Play (Makes new random shuffled Que and plays)
- D Drive (0-3) - Select CD-ROM drive for program
-
- Manage Que Functions:
-
- < > StepQue - Rotate stack of Que entries
- F Fill Que with all tracks in reverse order
- C Clear Que to 0 entries
- S Shuffle all Que entries
- I Insert number into current bottom of Que (prompt)
- 1-9 First digit of insert - before prompt
- D Delete number from Que (prompt)
- T Toggle Que Mode - Manage or normal modes
-
- Notes: Spacebar or Return/Enter accepts digits when valid
- Enter 0 to cancel number delete or insert
- When digits expected - only digits accepted
- Spacebar or other keys will exit Manage mode
- < > StepQue operates from keyboard when Que is on
-
-
- Slide Cue Time Scale Operation and Use:
-
- The time scale shows the current minute position and relative
- time remaining.
-
- It can be used to cue directly to any minute of the disc using
- the cursor keys.
-
- Cursor left/right - Slide reverse/forward 1 minute
- Cursor up - Move laser to selected minute and read
- time/track code
- Cursor down - Play to end of disc from selected location
-
- The normal program mode is automatic repeat play of the entire
- disc from start to finish. This mode is active when other modes
- are clear. When another mode is selected, prior modes are
- cleared. Pause, or skip functions clear other modes, and restore
- play to end operation.
-
- When the program is run, it checks to see if a I/F card is
- installed at the address. If card/drive isn't there, it will list
- line 10010 for editing. PRTA=&H300 is the base address for Port
- A on the card. If something else uses the address, it should not
- answer drive commands in the next step. Then the program trys a
- drive command to see if a drive answers. If no answer, changes
- the drive number and trys again. When no drive answers, decides
- the user forgot to turn it on, and waits to rerun.
-
- The program updates the screen times, watches for end of play, a
- keypress, or change in drive status, until something happens.
-
- If a CD is playing when the program is started, or when the drive
- number is changed, it obtains the current play location, and
- returns to it after finding the maximum times.
-
- Since basic is too slow to read the Disc Table of Contents (TOC)
- which lists the track times, it finds the maximum Minutes &
- Seconds through use of a clever "hack", by attempting play at 99
- minutes, then trying lower numbers until it sees the drive in
- play mode, then counts up until it goes to pause again. At that
- point, it backs up two seconds and reads the track number on the
- disc. Doing it this way allows you to have a player in basic
- with Source code. The Forth program just reads the TOC and gets
- the times, but Forthplay doesn't have all of the Romplay
- features.
-
- Times are used for display and skip wrap-around, while the
- maximum track number is needed for other operations.
-
- If your host is very fast, you may need to use slow mode or add
- some delay loops to let the max time routine operate properly.
-
- On ROM tracks the times change to yellow or light red.
-
- The drive remembers only the last start/end time given to it by
- the program. It will continue to play when the program is
- exited.
-
- The drive is intended for data transfer and it performs audio
- functions only through host control and monitoring of its
- operation.
-
-
- Forthplay Commands:
-
- Play ( n n Play ) ( n Play ) ( play )
- n is starting track n is ending track, ie: 2 5 Play
- n is starting and ending track, ie: 3 play
- Play plays tracks 1-99, or to disc end
- Tune Shows current Track and Index, if playing
- Time Time in Track and Time within entire disc
- Mode Reports Drive Status, except busy and lock
- TOC Generally shows Table of Contents for installed disc
- List of tracks, start times, and end time of disc
- Channels Reports status of mute bits to be used at next play
- Stereo Enable both channels at next play
- Left Enable left channel at next play
- Right Enable right channel at next play
- Mute Mute channels at next play
- Eject Ejects disc when not locked
- Accept Closetray
- CloseTray Accepts disc - CDR1503S only
- Lock Disables front panel Open/Eject button
- Unlock Enables Open/Eject button on drive
- Drive ( n Drive ) Sets Drive (0-3) for commands, ie: 3
- Drive
- Drives Reports active CD-ROM drives
- Romdrive Reports current CD-ROM drive used for commands
- Xplay ( n n n n n n xplay ) ( n n n xplay ) ( xplay)
- Xplay Extended play by min, sec, frame, to min, sec, frame
- 0 0 0 99 59 74 is default
- 0-6 arguments when stack is empty - if works strange
- retry
- Pause occurs when times are invalid
- Rplay Replay last xplay, Stime & Etime Setting
- Stime Set start location for repeat, must be playing disc
- Etime Set end location for repeat
- Menu Shows Command menu
- Bye Exits immediately to DOS on active drive
- Credits Resets Drive and I/O card to inital setting - shows
- opening
- Auto Starts automatic play like Romplay - partial
-
-
- implementation
-
-
- Forthplay consists of words added to the F83 Forth language.
-
- With Forthplay & F83 forth, the contents of the current line to
- the left of the cursor is read when Enter is pressed. Correct
- typing errors with the Backspace key and retype the remainder of
- the line. The editor you will be using is the one provided as
- part of this version of the language.
-
- Type one of the commands on the Menu screen and press
- Enter/Return.
-
- Commands which require numbers need the numbers before the
- command, with the numbers separated from each other and the
- command with a space. This is rather similar to some calculators
- which use "reverse Polish" number entry. (ie: number and += and
- second number and += or - etc.)
-
- Forth accepts numbers using a "stack" to hold the numbers. Words
- which need numbers expect to find them on the stack. Words which
- obtain numbers, leave the numbers on the stack for other words to
- use. This is why numbers must precede command words which use
- them. Entering the required numbers separately from the command
- is possible, so that entering:
-
- 1
- 10
- PLAY
-
- works the same as:
-
- 1 10 PLAY
-
- which will cause the drive to play tracks 1 to 10, and then
- pause.
-
- 2 PLAY
-
- will play only track 2.
-
- 1 0 32 2 59 74 XPLAY
-
- will play from minute 1, second 0, frame 32, to minute 2, second
- 59, frame 74.
-
- 20 XPLAY
-
- will play the remainder of the disc from 20 minutes.
-
- Xplay defaults to 0 0 0 99 59 74, limiting is done, but no error
- checks.
-
- TOC provides a list of track start times by track number.
- Once read for a disc, .TOC will show it again. If TOC seems to
- be showing times for a prior disc, do DRIVES which will clear the
- old disc status.
-
- When Forthplay is first started, use DRIVES then MODE to see
- if everything is working.
-
- Forthplay doesn't error check. Once it starts, you're in a live
- programming language which assumes that you know what you're
- doing.
-
- There are many words not on the Menu screen, so if you type a
- word forth doesn't know, it will print the word followed by ?
- and clear any numbers from the stack. Some of the command words
- were selected to use alternate names because Forth already used
- the first word chosen for another function. If you type a word
- Forth knows without the arguments it needs, you may lock up the
- system or leave invalid values for the next word used. If you
- bomb out, power down for 15 seconds, and cold start to be sure
- your system is clean.
-
- You can get a list of words used to make the program by entering
-
- Words
-
- Press spacebar to stop listing. The last words defined are
- listed first. All words before EMPTY are part of Forthplay.
-
- Enter SEE wordname to see the contents of a word. Try:
-
- SEE ACCEPT
-
- Always Exit Forthplay with Bye and Romplay with Quit to reset the
- Interface Card and make sure DMA channel 3 is clear. Although my
- programs don't use it, the interface card may be enabled if you
- exit improperly, causing panic when the Hard Drive on your XT
- doesn't work.
-
- These programs talk only to the Hitachi I/F Card and Drive.
- Everything else is handled by F83 or basic.
-
- Forthplay and Romplay are private works not written for hire, but
- rather for my own use. They are not supported by any Hitachi
- company or division, and the code they use may not be supported
- on future models. You use the programs or code at your own risk,
- they represent my understanding of hardware commands.
-
- Background:
-
- My first audio player software for CD-ROM drives was Forthplay.
- It came alive on the evening of December 6, 1987, based on the
- hardware docs for program developers from Hitachi Sales Corp. of
- America. Most of Forthplay was done on a Compaq portable the
- following weekend. Without the fine work of Laxen and Perry on
- F83, neither Forthplay or Romplay would exist.
-
- The availability of Forthplay later led to use of several
- CDR1503S drives by Knotts Berry Farm (a southern California
- amusement attraction), when they decided to use Forth and Hitachi
- drives for audio applications.
-
- A version of Forthplay was also done for the original Atari 800
- computer, with interfacing being handled through joystick ports
- 1-3. Worked nicely.
-
- Romplay started as a lark during a three day weekend in Feb. 88.
- It was begun to see what could be done with basic. Suprised me
- that anything was possible, let alone Romplay. I consider it a
- "good hack".
-
- Romplay met a few CD-ROM insiders at the 1988 Microsft CD-ROM
- conference in Seattle, Wa, and one of the Nimbus people got the
- first copy. Along the way, a few others received copies to use
- in demos. Afterwards, I added features every couple of months,
- until it reached its present state. Romplay3 was a search for a
- better screen layout, with the use of character graphics for a
- BIG time display. At 4.47MHz, it skips a second display every
- now and then. A full graphics diplay and mouse is needed to do a
- Mac-like picture of a CD audio player with all the buttons
- working.
-
- As part of the distribution disk, you may have versions of
- Allplay and Romlock, a set of small executeable utilities.
- Allplay issues a play all tracks command to drives 0-3, and
- LOCK300.EXE and KCOL300.EXE which lock and unlock the drives at
- various addresses. Allplay may be named PLAY300.EXE or have a
- valid base address as part of its name.
-
- Forthplay and Romplay versions below 1.0 are Freeware and may be
- copied as needed. They are dedicated to all the people who have
- created free software for any computer system. Thanks... Roscoe
-
- Tomcat Softworks
- Contact: 71777,2564